package com.xc.stock.constant;

/**
 * @author xlfd
 * @email xlfd@gmail.com
 * @version 1.0
 * @created Jan 13, 2021 11:53:31 AM
 */
public enum AppVersionType {
	USER_APP_ANDROID("user_app_android", "用户APP安卓端"),
    USER_APP_IOS("user_app_ios", "用户APP苹果端"),
//    SHOP_APP_ANDROID("shop_app_android", "商家APP安卓端"),
//    SHOP_APP_IOS("shop_app_ios", "商家APPIOS"),
    
	;

	String code;
	String remark;
	AppVersionType(String code, String remark) {
		this.code = code;
		this.remark = remark;
	}

	public String code() {
		return code;
	}

	public String remark() {
		return remark;
	}

	public static String remark(String code) {
		AppVersionType of = of(code);
		return of == null ? "" : of.remark;
 	}
	
	public static AppVersionType of(String code) {
		AppVersionType[] values = AppVersionType.values();
		for (AppVersionType e : values) {
			if (e.code.equals(code)) {
				return e;
			}
		}

		return null;
	}
}
